home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / GraphicViewers / pCD / Source / hpcdtoppm.0.4 / config.h < prev    next >
C/C++ Source or Header  |  1993-03-23  |  3KB  |  129 lines

  1. /* hpcdtoppm (Hadmut's pcdtoppm) v0.4
  2. *  Copyright (c) 1992, 1993 by Hadmut Danisch (danisch@ira.uka.de).
  3. *  Permission to use and distribute this software and its
  4. *  documentation for noncommercial use and without fee is hereby granted,
  5. *  provided that the above copyright notice appear in all copies and that
  6. *  both that copyright notice and this permission notice appear in
  7. *  supporting documentation. It is not allowed to sell this software in 
  8. *  any way. This software is not public domain.
  9. */
  10.  
  11.  
  12.  
  13. /* define OWN_WRITE either here or by compiler-option if you don't want to use
  14.    the pbmplus-routines for writing */
  15. /* #define OWN_WRITE */
  16.  
  17.  
  18.  
  19. /* define DEBUG for some debugging informations */
  20. /* #define DEBUG */
  21.  
  22.  
  23. /* define DO_DECL_EXT for external declaration of system and library calls */
  24. #define DO_DECL_EXT
  25. #ifdef __NeXT__        /* not needed on NeXTSTEP */
  26. #   undef DO_DECL_EXT
  27. #endif
  28.  
  29.  
  30. /* define FASTHUFF for faster Huffman decoding with tables.
  31. ** this makes a little speedup, but needs about 768 KByte memory
  32. */
  33. #define FASTHUFF
  34.  
  35.  
  36.  
  37. #ifdef OWN_WRITE
  38. /* If the own routines are used, this is the size of the buffer in bytes.
  39.    You can shrink if needed. */
  40. #define own_BUsize 50000
  41.  
  42. /* The header for the ppm-files */
  43. #define PPM_Header "P6\n%ld %ld\n255\n"
  44. #define PGM_Header "P5\n%ld %ld\n255\n"
  45.  
  46.  
  47. #endif
  48.  
  49.  
  50.  
  51. /* fopen Parameters, for some systems (MS-DOS :-( ) you need "wb" and "rb" */
  52. #define W_OP "w"
  53. #define R_OP "r"
  54.  
  55.  
  56.  
  57.  
  58. /*
  59. ** Data Types
  60. ** Important: sBYTE must be a signed byte type !
  61. ** If your compiler doesn't understand "signed", remove it.
  62. */
  63.  
  64. #ifndef sBYTE
  65. typedef   signed char sBYTE;
  66. #endif
  67.  
  68. typedef unsigned char uBYTE;
  69. typedef unsigned long dim;
  70. typedef          long sdim;
  71.  
  72.  
  73.  
  74. /* Default taken when no size parameter given,
  75. ** C_DEFAULT depends on your taste and video-hardware,
  76. */
  77.  
  78. #define S_DEFAULT S_Base16
  79. #define O_DEFAULT O_PPM
  80. #define C_DEFAULT C_LINEAR
  81. #define T_DEFAULT T_AUTO
  82.  
  83.  
  84. /* Background and orientation for contact sheet */
  85. #define CONTLUM neutrLum
  86. #define CONTCH1 neutrCh1
  87. #define CONTCH2 neutrCh2
  88. #define CONTORI T_LEFT
  89.  
  90.  
  91.  
  92. /* Maximum Black value of frame for cutting of the
  93. ** frame. If MAX_BLACK is n, a frame is detected, when
  94. ** all Luma values are within [ 0 .. (n-1) ]
  95. */
  96. #define MAX_BLACK 1
  97.  
  98. /* Default Postscript paper size
  99. ** (German DIN A 4 )
  100. */
  101. #define DEF_PAPER_LEFT    50.0
  102. #define DEF_PAPER_BOTTOM  50.0
  103. #define DEF_PAPER_WIDTH  500.0
  104. #define DEF_PAPER_HEIGHT 750.0
  105.  
  106.  
  107.  
  108.  
  109. /* External Declarations */
  110. #ifdef DO_DECL_EXT
  111.  
  112. extern int fprintf();
  113. extern int fclose();
  114. extern char *malloc();
  115. extern int fseek();
  116. extern int fread();
  117. extern int fwrite();
  118. extern int sscanf();    
  119. extern int fputs();
  120.  
  121. #endif
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.